//
//  OSCBaseTableViewModel.h
//  OSChina
//
//  Created by 8b410-2 on 17/1/2.
//  Copyright © 2017年 abb. All rights reserved.
//

#import "OSCBaseViewModel.h"
#import "OSCListRequestParams.h"
typedef NS_ENUM(NSInteger,OSCRefreshDataStatus) {
    OSCHeaderRefresh_HasMoreData = 1,
    OSCHeaderRefresh_HasNoMoreData,
    OSCFooterRefresh_HasMoreData,
    OSCFooterRefresh_HasNoMoreData,
    OSCRefreshError,
    OSCRefreshUI,
};

@interface OSCBaseTableViewModel : OSCBaseViewModel
/// 请求参数
@property (nonatomic, strong, readwrite) OSCListRequestParams *listParams;
/// 刷新结束信号
@property (nonatomic, strong) RACSubject *refreshEndSubject;
/// 刷新ui信号
@property (nonatomic, strong) RACSubject *refreshUI;
/// 是否自动处理刷新状态
@property (nonatomic, assign) BOOL autoRefreshStatus;
/// 数据源信号
@property (nonatomic, strong) RACSignal *dataSourceSignal;
/// 数据源
@property (nonatomic, copy) NSArray *dataSource;
/// tableView类型
@property (nonatomic, assign) NSInteger tableViewStyle;
/// cell点击信号
@property (nonatomic, strong) RACCommand *didSelectCommand;
/// 请求列表数据操作
@property (nonatomic, strong, readonly) RACCommand *requestListDataCommand;
/// 刷新类型
@property (nonatomic, strong) RACSubject *needRefresh;

/**
 请求列表数据信号
 */
- (RACSignal *)requestListDataSignal;

/**
 根据数据处理头部刷新状态

 @param array 数据
 */
- (void)makeHeaderRefreshWithArray:(NSArray *)array;

/**
 根据数据请求底部刷新状态

 @param array 数据
 */
- (void)makeFootRefreshWithArray:(NSArray *)array;

@end
